package com.fengze.business.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fengze.business.domain.PerformancePlan;
import com.fengze.business.vo.PerformancePlanVO;
import org.apache.ibatis.annotations.Param;

/**
 * 合同履约计划Mapper接口
 * 
 * @author lug
 * @date 2024-02-04
 */
public interface PerformancePlanMapper 
{
    /**
     * 查询合同履约计划
     * 
     * @param id 合同履约计划主键
     * @return 合同履约计划
     */
    public PerformancePlan selectPerformancePlanById(Long id);

    /**
     * 查询合同履约计划列表
     * 
     * @param performancePlan 合同履约计划
     * @return 合同履约计划集合
     */
    public List<PerformancePlan> selectPerformancePlanList(PerformancePlan performancePlan);

    /**
     * 新增合同履约计划
     * 
     * @param performancePlan 合同履约计划
     * @return 结果
     */
    public int insertPerformancePlan(PerformancePlan performancePlan);

    /**
     * 修改合同履约计划
     * 
     * @param performancePlan 合同履约计划
     * @return 结果
     */
    public int updatePerformancePlan(PerformancePlan performancePlan);

    /**
     * 删除合同履约计划
     * 
     * @param id 合同履约计划主键
     * @return 结果
     */
    public int deletePerformancePlanById(Long id);

    /**
     * 批量删除合同履约计划
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePerformancePlanByIds(Long[] ids);

    /**
     * 批量插入数据
     * @param planList
     */
    void insertBatch(List<PerformancePlan> planList);

    List<PerformancePlan> selectListByContractId(Long contractId);

    int deleteByContractIds(Long[] contractIds);

    int plusMoney(@Param("id") Long id,@Param("collectionMoney") BigDecimal collectionMoney);

    int subtractById(@Param("id") Long id,@Param("subtract") BigDecimal subtract);

    int danagerTotal();

    int breachTotal(Long contractId);

    List<PerformancePlanVO> queryRemindInfoListByDate(Date aheadDate);

    List<PerformancePlanVO> queryRemindInfoListLessDate(Date overDate);
}
